RTrim Function

Returns the String data type passed with trailing (right side) whitespaces removed.

Syntax

result = RTrim( SourceString )

result = stringVariable.RTrim


Parameters

SourceString

String

The source, a copy of which, to be returned with trailing whitespaces removed.



Notes

Rtrim uses the list of unicode "whitespace" characters at http://www.unicode.org/Public/UNIDATA/UCD.html#White_Space.


Examples

This example removes the whitespaces from the right side of the string passed:

Dim s as String
s=RTrim("  Hello World  ")  //Returns "  Hello World"

See Also

Asc, Chr, InStr, Len, Left, LTrim, Mid, Trim functions; String data type.